package com.njsoft.bodyawakening.view;

import android.content.Context;
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.Paint;
import android.support.v4.widget.NestedScrollView;
import android.util.AttributeSet;
import android.widget.LinearLayout;

public class MyNestedScrollView extends NestedScrollView {
    private Paint paint;

    public MyNestedScrollView(Context context) {
        super(context);
        paint = new Paint();
        paint.setColor(Color.RED);//画笔颜色为红色
        paint.setStrokeWidth(5);
    }

    @Override
    protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
        super.onMeasure(widthMeasureSpec, heightMeasureSpec);
    }

    @Override
    protected void onDraw(Canvas canvas) {
        super.onDraw(canvas);
        canvas.drawLine(0, 0, 300, 50, paint);
        canvas.drawCircle(0, 0, 200, paint);
    }
}
